package aynu.oracle.video.util;

import org.springframework.util.ResourceUtils;

import java.io.File;

//@Deprecated
public class RunEnvironment {
    private static String path = null;
    public static String getPath() throws Exception{
        if (path != null) return path;
        path = ResourceUtils.getURL("classpath:").getPath();
        File file = new File(path + "static");
        String[] list = file.list();
        if (list == null || list.length == 0) {
            path = ResourceUtils.getURL("file:").getPath();
        }
        return path;
    }
}
